package org.raymond.iworks.study.app;

import org.apache.commons.lang3.ClassUtils;
import org.junit.jupiter.api.Test;
import org.raymond.iworks.apis.ITSysPermissionServiceApi;
import org.raymond.iworks.core.utils.PermissionUtil;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.*;

@SpringBootTest
public class ClassTest {

    @Test
    public void test1(){
        Class clazz = ITSysPermissionServiceApi.class;
        String p = ClassUtils.getPackageName(clazz);
        List<Class> clz = PermissionUtil.getAllClass(p);
        List<Map<String, Object>> list = new ArrayList<>();
        clz.stream().forEach(c->{
            list.addAll(PermissionUtil.groupMethods(c));
        });
        System.out.println(list);
    }
}
